<template>
  <h1>setup&props</h1>
</template>

<script lang="ts">
import { ref, defineComponent } from 'vue';
export default defineComponent({
  name: "setup&props",
  setup(props, context) {
    let name = ref("veloma");
    let address = ref("山东省青岛市");
    setTimeout(() => {
      console.log("上下文", context);
      name.value = "山竹"
      address.value = "李沧区";
    }, 2000);
    return {
      name,
      address
    }
  }
})
</script>
